package org.example.cdpcrpbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.cdpcrpbackend.controller.dto.StudentInfo;
import org.example.cdpcrpbackend.domain.Student;

import java.util.List;

public interface StudentMapper extends BaseMapper<Student> {
    @Select("select * from tb_student where password=#{password} and (id=#{username} or email=#{username})")
    Student login(@Param("username") String username, @Param("password") String password);

    StudentInfo studentInfo(@Param("studentId") String studentId);


    List<StudentInfo> listByCondition(@Param("cid") String cid, @Param("key") String key);

}
